package com.jltx.zeus.viewmodel

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.CoroutineScope


/**
 * @author jltxseo
 *         Created by junlintianxia on 2020/05/10.
 */
open class BaseAndroidViewModel(application: Application) : AndroidViewModel(application),
    CoroutineDelegate {
    val vmActionEvent = MutableLiveData<BaseActionEvent>()

    override val viewModelScope: CoroutineScope
        get() = (this as ViewModel).viewModelScope

    override val actionEvent: MutableLiveData<BaseActionEvent>
        get() = vmActionEvent
}
